Integrand size = 39, antiderivative size = 314 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\frac {\left (a^3 B+4 a b^2 B-b^3 (A+2 C)-a^2 b (4 A+3 C)\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} (a+b)^{7/2} d}+\frac {a \left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{3 b^2 \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {\left (3 A b^4+a^3 b B-6 a b^3 B-4 a^4 C+a^2 b^2 (2 A+9 C)\right ) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}+\frac {\left (a^4 b B-10 a^2 b^3 B-6 b^5 B+a^3 b^2 (2 A-5 C)+2 a^5 C+a b^4 (13 A+18 C)\right ) \sin (c+d x)}{6 b^2 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))} \]
(B*a^3+4*B*a*b^2-b^3*(A+2*C)-a^2*b*(4*A+3*C))*arctan((a-b)^(1/2)*tan(1/2*d *x+1/2*c)/(a+b)^(1/2))/(a-b)^(7/2)/(a+b)^(7/2)/d+1/3*a*(A*b^2-a*(B*b-C*a)) *sin(d*x+c)/b^2/(a^2-b^2)/d/(a+b*cos(d*x+c))^3+1/6*(3*A*b^4+B*a^3*b-6*B*a* b^3-4*a^4*C+a^2*b^2*(2*A+9*C))*sin(d*x+c)/b^2/(a^2-b^2)^2/d/(a+b*cos(d*x+c ))^2+1/6*(B*a^4*b-10*B*a^2*b^3-6*B*b^5+a^3*b^2*(2*A-5*C)+2*C*a^5+a*b^4*(13 *A+18*C))*sin(d*x+c)/b^2/(a^2-b^2)^3/d/(a+b*cos(d*x+c))
Time = 3.17 (sec) , antiderivative size = 307, normalized size of antiderivative = 0.98 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\frac {-\frac {24 \left (a^3 B+4 a b^2 B-b^3 (A+2 C)-a^2 b (4 A+3 C)\right ) \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}+\frac {2 \left (12 a^5 A+22 a^3 A b^2+11 a A b^4-25 a^4 b B-14 a^2 b^3 B-6 b^5 B+10 a^5 C+17 a^3 b^2 C+18 a b^4 C+6 \left (-A b^5+a^5 B-9 a^3 b^2 B-2 a b^4 B+9 a^2 b^3 (A+C)+a^4 b (2 A+C)\right ) \cos (c+d x)+\left (a^4 b B-10 a^2 b^3 B-6 b^5 B+a^3 b^2 (2 A-5 C)+2 a^5 C+a b^4 (13 A+18 C)\right ) \cos (2 (c+d x))\right ) \sin (c+d x)}{(a+b \cos (c+d x))^3}}{24 \left (a^2-b^2\right )^3 d} \]
((-24*(a^3*B + 4*a*b^2*B - b^3*(A + 2*C) - a^2*b*(4*A + 3*C))*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/Sqrt[-a^2 + b^2] + (2*(12*a^5*A + 22*a^3*A*b^2 + 11*a*A*b^4 - 25*a^4*b*B - 14*a^2*b^3*B - 6*b^5*B + 10*a^5 *C + 17*a^3*b^2*C + 18*a*b^4*C + 6*(-(A*b^5) + a^5*B - 9*a^3*b^2*B - 2*a*b ^4*B + 9*a^2*b^3*(A + C) + a^4*b*(2*A + C))*Cos[c + d*x] + (a^4*b*B - 10*a ^2*b^3*B - 6*b^5*B + a^3*b^2*(2*A - 5*C) + 2*a^5*C + a*b^4*(13*A + 18*C))* Cos[2*(c + d*x)])*Sin[c + d*x])/(a + b*Cos[c + d*x])^3)/(24*(a^2 - b^2)^3* d)
Time = 1.24 (sec) , antiderivative size = 359, normalized size of antiderivative = 1.14, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.282, Rules used = {3042, 3510, 25, 3042, 3500, 3042, 3233, 27, 3042, 3138, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 3510 |
\(\displaystyle \frac {\int -\frac {-3 b \left (a^2-b^2\right ) C \cos ^2(c+d x)-\left (-C a^3+b B a^2+b^2 (2 A+3 C) a-3 b^3 B\right ) \cos (c+d x)+3 b \left (A b^2-a (b B-a C)\right )}{(a+b \cos (c+d x))^3}dx}{3 b^2 \left (a^2-b^2\right )}+\frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {\int \frac {-3 b \left (a^2-b^2\right ) C \cos ^2(c+d x)-\left (-C a^3+b B a^2+b^2 (2 A+3 C) a-3 b^3 B\right ) \cos (c+d x)+3 b \left (A b^2-a (b B-a C)\right )}{(a+b \cos (c+d x))^3}dx}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {\int \frac {-3 b \left (a^2-b^2\right ) C \sin \left (c+d x+\frac {\pi }{2}\right )^2+\left (C a^3-b B a^2-b^2 (2 A+3 C) a+3 b^3 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+3 b \left (A b^2-a (b B-a C)\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3500 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\int \frac {2 \left (C a^3+2 b B a^2-b^2 (5 A+6 C) a+3 b^3 B\right ) b^2+\left (2 C a^4+b B a^3+b^2 (2 A-3 C) a^2-6 b^3 B a+3 b^4 (A+2 C)\right ) \cos (c+d x) b}{(a+b \cos (c+d x))^2}dx}{2 b \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\int \frac {2 \left (C a^3+2 b B a^2-b^2 (5 A+6 C) a+3 b^3 B\right ) b^2+\left (2 C a^4+b B a^3+b^2 (2 A-3 C) a^2-6 b^3 B a+3 b^4 (A+2 C)\right ) \sin \left (c+d x+\frac {\pi }{2}\right ) b}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 b \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3233 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\frac {b \sin (c+d x) \left (2 a^5 C+a^4 b B+a^3 b^2 (2 A-5 C)-10 a^2 b^3 B+a b^4 (13 A+18 C)-6 b^5 B\right )}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}-\frac {\int -\frac {3 b^3 \left (B a^3-b (4 A+3 C) a^2+4 b^2 B a-b^3 (A+2 C)\right )}{a+b \cos (c+d x)}dx}{a^2-b^2}}{2 b \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\frac {3 b^3 \left (a^3 B-a^2 b (4 A+3 C)+4 a b^2 B-b^3 (A+2 C)\right ) \int \frac {1}{a+b \cos (c+d x)}dx}{a^2-b^2}+\frac {b \sin (c+d x) \left (2 a^5 C+a^4 b B+a^3 b^2 (2 A-5 C)-10 a^2 b^3 B+a b^4 (13 A+18 C)-6 b^5 B\right )}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\frac {3 b^3 \left (a^3 B-a^2 b (4 A+3 C)+4 a b^2 B-b^3 (A+2 C)\right ) \int \frac {1}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}+\frac {b \sin (c+d x) \left (2 a^5 C+a^4 b B+a^3 b^2 (2 A-5 C)-10 a^2 b^3 B+a b^4 (13 A+18 C)-6 b^5 B\right )}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\frac {6 b^3 \left (a^3 B-a^2 b (4 A+3 C)+4 a b^2 B-b^3 (A+2 C)\right ) \int \frac {1}{(a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{d \left (a^2-b^2\right )}+\frac {b \sin (c+d x) \left (2 a^5 C+a^4 b B+a^3 b^2 (2 A-5 C)-10 a^2 b^3 B+a b^4 (13 A+18 C)-6 b^5 B\right )}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}}{3 b^2 \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {a \sin (c+d x) \left (A b^2-a (b B-a C)\right )}{3 b^2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {-\frac {\sin (c+d x) \left (-4 a^4 C+a^3 b B+a^2 b^2 (2 A+9 C)-6 a b^3 B+3 A b^4\right )}{2 d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac {\frac {6 b^3 \left (a^3 B-a^2 b (4 A+3 C)+4 a b^2 B-b^3 (A+2 C)\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )}+\frac {b \sin (c+d x) \left (2 a^5 C+a^4 b B+a^3 b^2 (2 A-5 C)-10 a^2 b^3 B+a b^4 (13 A+18 C)-6 b^5 B\right )}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}}{3 b^2 \left (a^2-b^2\right )}\) |
(a*(A*b^2 - a*(b*B - a*C))*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) - (-1/2*((3*A*b^4 + a^3*b*B - 6*a*b^3*B - 4*a^4*C + a^2*b^2*(2 *A + 9*C))*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) - ((6*b^3* (a^3*B + 4*a*b^2*B - b^3*(A + 2*C) - a^2*b*(4*A + 3*C))*ArcTan[(Sqrt[a - b ]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a^2 - b^2)*d) + (b*(a^4*b*B - 10*a^2*b^3*B - 6*b^5*B + a^3*b^2*(2*A - 5*C) + 2*a^5*C + a *b^4*(13*A + 18*C))*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])))/(2 *b*(a^2 - b^2)))/(3*b^2*(a^2 - b^2))
3.11.4.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*( m + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* (a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A *b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)*Cos[ e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - S imp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*( m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d + b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1)) ))*Sin[e + f*x] - b*C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; F reeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Time = 0.58 (sec) , antiderivative size = 449, normalized size of antiderivative = 1.43
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (-\frac {\left (2 A \,a^{3}+2 A \,a^{2} b +6 a A \,b^{2}+A \,b^{3}-B \,a^{3}-6 B \,a^{2} b -2 B a \,b^{2}-2 B \,b^{3}+2 a^{3} C +3 a^{2} b C +6 C a \,b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 b^{2} a +b^{3}\right )}-\frac {2 \left (3 A \,a^{3}+7 a A \,b^{2}-7 B \,a^{2} b -3 B \,b^{3}+a^{3} C +9 C a \,b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}-2 a b +b^{2}\right ) \left (a^{2}+2 a b +b^{2}\right )}-\frac {\left (2 A \,a^{3}-2 A \,a^{2} b +6 a A \,b^{2}-A \,b^{3}+B \,a^{3}-6 B \,a^{2} b +2 B a \,b^{2}-2 B \,b^{3}+2 a^{3} C -3 a^{2} b C +6 C a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 b^{2} a -b^{3}\right )}\right )}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a +b \right )}^{3}}-\frac {\left (4 A \,a^{2} b +A \,b^{3}-B \,a^{3}-4 B a \,b^{2}+3 a^{2} b C +2 C \,b^{3}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{d}\) | \(449\) |
default | \(\frac {-\frac {2 \left (-\frac {\left (2 A \,a^{3}+2 A \,a^{2} b +6 a A \,b^{2}+A \,b^{3}-B \,a^{3}-6 B \,a^{2} b -2 B a \,b^{2}-2 B \,b^{3}+2 a^{3} C +3 a^{2} b C +6 C a \,b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 b^{2} a +b^{3}\right )}-\frac {2 \left (3 A \,a^{3}+7 a A \,b^{2}-7 B \,a^{2} b -3 B \,b^{3}+a^{3} C +9 C a \,b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}-2 a b +b^{2}\right ) \left (a^{2}+2 a b +b^{2}\right )}-\frac {\left (2 A \,a^{3}-2 A \,a^{2} b +6 a A \,b^{2}-A \,b^{3}+B \,a^{3}-6 B \,a^{2} b +2 B a \,b^{2}-2 B \,b^{3}+2 a^{3} C -3 a^{2} b C +6 C a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 b^{2} a -b^{3}\right )}\right )}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a +b \right )}^{3}}-\frac {\left (4 A \,a^{2} b +A \,b^{3}-B \,a^{3}-4 B a \,b^{2}+3 a^{2} b C +2 C \,b^{3}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{d}\) | \(449\) |
risch | \(\text {Expression too large to display}\) | \(1968\) |
1/d*(-2*(-1/2*(2*A*a^3+2*A*a^2*b+6*A*a*b^2+A*b^3-B*a^3-6*B*a^2*b-2*B*a*b^2 -2*B*b^3+2*C*a^3+3*C*a^2*b+6*C*a*b^2)/(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan( 1/2*d*x+1/2*c)^5-2/3*(3*A*a^3+7*A*a*b^2-7*B*a^2*b-3*B*b^3+C*a^3+9*C*a*b^2) /(a^2-2*a*b+b^2)/(a^2+2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3-1/2*(2*A*a^3-2*A*a^2 *b+6*A*a*b^2-A*b^3+B*a^3-6*B*a^2*b+2*B*a*b^2-2*B*b^3+2*C*a^3-3*C*a^2*b+6*C *a*b^2)/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1 /2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^3-(4*A*a^2*b+A*b^3-B*a^3-4*B*a*b^2+3 *C*a^2*b+2*C*b^3)/(a^6-3*a^4*b^2+3*a^2*b^4-b^6)/((a-b)*(a+b))^(1/2)*arctan ((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 670 vs. \(2 (300) = 600\).
Time = 0.37 (sec) , antiderivative size = 1410, normalized size of antiderivative = 4.49 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display} \]
integrate(cos(d*x+c)*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^4,x, algorithm="fricas")
[-1/12*(3*(B*a^6 - (4*A + 3*C)*a^5*b + 4*B*a^4*b^2 - (A + 2*C)*a^3*b^3 + ( B*a^3*b^3 - (4*A + 3*C)*a^2*b^4 + 4*B*a*b^5 - (A + 2*C)*b^6)*cos(d*x + c)^ 3 + 3*(B*a^4*b^2 - (4*A + 3*C)*a^3*b^3 + 4*B*a^2*b^4 - (A + 2*C)*a*b^5)*co s(d*x + c)^2 + 3*(B*a^5*b - (4*A + 3*C)*a^4*b^2 + 4*B*a^3*b^3 - (A + 2*C)* a^2*b^4)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c ) - a^2 + 2*b^2)/(b^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a^2)) - 2*(2*( 3*A + 2*C)*a^7 - 13*B*a^6*b + (4*A + 7*C)*a^5*b^2 + 11*B*a^4*b^3 - 11*(A + C)*a^3*b^4 + 2*B*a^2*b^5 + A*a*b^6 + (2*C*a^7 + B*a^6*b + (2*A - 7*C)*a^5 *b^2 - 11*B*a^4*b^3 + (11*A + 23*C)*a^3*b^4 + 4*B*a^2*b^5 - (13*A + 18*C)* a*b^6 + 6*B*b^7)*cos(d*x + c)^2 + 3*(B*a^7 + (2*A + C)*a^6*b - 10*B*a^5*b^ 2 + (7*A + 8*C)*a^4*b^3 + 7*B*a^3*b^4 - (10*A + 9*C)*a^2*b^5 + 2*B*a*b^6 + A*b^7)*cos(d*x + c))*sin(d*x + c))/((a^8*b^3 - 4*a^6*b^5 + 6*a^4*b^7 - 4* a^2*b^9 + b^11)*d*cos(d*x + c)^3 + 3*(a^9*b^2 - 4*a^7*b^4 + 6*a^5*b^6 - 4* a^3*b^8 + a*b^10)*d*cos(d*x + c)^2 + 3*(a^10*b - 4*a^8*b^3 + 6*a^6*b^5 - 4 *a^4*b^7 + a^2*b^9)*d*cos(d*x + c) + (a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5 *b^6 + a^3*b^8)*d), 1/6*(3*(B*a^6 - (4*A + 3*C)*a^5*b + 4*B*a^4*b^2 - (A + 2*C)*a^3*b^3 + (B*a^3*b^3 - (4*A + 3*C)*a^2*b^4 + 4*B*a*b^5 - (A + 2*C)*b ^6)*cos(d*x + c)^3 + 3*(B*a^4*b^2 - (4*A + 3*C)*a^3*b^3 + 4*B*a^2*b^4 - (A + 2*C)*a*b^5)*cos(d*x + c)^2 + 3*(B*a^5*b - (4*A + 3*C)*a^4*b^2 + 4*B*...
Timed out. \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Exception raised: ValueError} \]
integrate(cos(d*x+c)*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^4,x, algorithm="maxima")
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 966 vs. \(2 (300) = 600\).
Time = 0.40 (sec) , antiderivative size = 966, normalized size of antiderivative = 3.08 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display} \]
-1/3*(3*(B*a^3 - 4*A*a^2*b - 3*C*a^2*b + 4*B*a*b^2 - A*b^3 - 2*C*b^3)*(pi* floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1 /2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^6 - 3*a^4*b^2 + 3*a^ 2*b^4 - b^6)*sqrt(a^2 - b^2)) - (6*A*a^5*tan(1/2*d*x + 1/2*c)^5 - 3*B*a^5* tan(1/2*d*x + 1/2*c)^5 + 6*C*a^5*tan(1/2*d*x + 1/2*c)^5 - 6*A*a^4*b*tan(1/ 2*d*x + 1/2*c)^5 - 12*B*a^4*b*tan(1/2*d*x + 1/2*c)^5 - 3*C*a^4*b*tan(1/2*d *x + 1/2*c)^5 + 12*A*a^3*b^2*tan(1/2*d*x + 1/2*c)^5 + 27*B*a^3*b^2*tan(1/2 *d*x + 1/2*c)^5 + 6*C*a^3*b^2*tan(1/2*d*x + 1/2*c)^5 - 27*A*a^2*b^3*tan(1/ 2*d*x + 1/2*c)^5 - 12*B*a^2*b^3*tan(1/2*d*x + 1/2*c)^5 - 27*C*a^2*b^3*tan( 1/2*d*x + 1/2*c)^5 + 12*A*a*b^4*tan(1/2*d*x + 1/2*c)^5 + 6*B*a*b^4*tan(1/2 *d*x + 1/2*c)^5 + 18*C*a*b^4*tan(1/2*d*x + 1/2*c)^5 + 3*A*b^5*tan(1/2*d*x + 1/2*c)^5 - 6*B*b^5*tan(1/2*d*x + 1/2*c)^5 + 12*A*a^5*tan(1/2*d*x + 1/2*c )^3 + 4*C*a^5*tan(1/2*d*x + 1/2*c)^3 - 28*B*a^4*b*tan(1/2*d*x + 1/2*c)^3 + 16*A*a^3*b^2*tan(1/2*d*x + 1/2*c)^3 + 32*C*a^3*b^2*tan(1/2*d*x + 1/2*c)^3 + 16*B*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 - 28*A*a*b^4*tan(1/2*d*x + 1/2*c)^3 - 36*C*a*b^4*tan(1/2*d*x + 1/2*c)^3 + 12*B*b^5*tan(1/2*d*x + 1/2*c)^3 + 6 *A*a^5*tan(1/2*d*x + 1/2*c) + 3*B*a^5*tan(1/2*d*x + 1/2*c) + 6*C*a^5*tan(1 /2*d*x + 1/2*c) + 6*A*a^4*b*tan(1/2*d*x + 1/2*c) - 12*B*a^4*b*tan(1/2*d*x + 1/2*c) + 3*C*a^4*b*tan(1/2*d*x + 1/2*c) + 12*A*a^3*b^2*tan(1/2*d*x + 1/2 *c) - 27*B*a^3*b^2*tan(1/2*d*x + 1/2*c) + 6*C*a^3*b^2*tan(1/2*d*x + 1/2...
Time = 5.85 (sec) , antiderivative size = 516, normalized size of antiderivative = 1.64 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^4} \, dx=\frac {\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A\,a^3-A\,b^3+B\,a^3-2\,B\,b^3+2\,C\,a^3+6\,A\,a\,b^2-2\,A\,a^2\,b+2\,B\,a\,b^2-6\,B\,a^2\,b+6\,C\,a\,b^2-3\,C\,a^2\,b\right )}{\left (a+b\right )\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,A\,a^3-3\,B\,b^3+C\,a^3+7\,A\,a\,b^2-7\,B\,a^2\,b+9\,C\,a\,b^2\right )}{3\,{\left (a+b\right )}^2\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (2\,A\,a^3+A\,b^3-B\,a^3-2\,B\,b^3+2\,C\,a^3+6\,A\,a\,b^2+2\,A\,a^2\,b-2\,B\,a\,b^2-6\,B\,a^2\,b+6\,C\,a\,b^2+3\,C\,a^2\,b\right )}{{\left (a+b\right )}^3\,\left (a-b\right )}}{d\,\left (3\,a\,b^2-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-3\,a^3+3\,a^2\,b+3\,a\,b^2-3\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (-3\,a^3-3\,a^2\,b+3\,a\,b^2+3\,b^3\right )+3\,a^2\,b+a^3+b^3+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )\right )}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a-2\,b\right )\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )}{2\,\sqrt {a+b}\,{\left (a-b\right )}^{7/2}}\right )\,\left (A\,b^3-B\,a^3+2\,C\,b^3+4\,A\,a^2\,b-4\,B\,a\,b^2+3\,C\,a^2\,b\right )}{d\,{\left (a+b\right )}^{7/2}\,{\left (a-b\right )}^{7/2}} \]
((tan(c/2 + (d*x)/2)*(2*A*a^3 - A*b^3 + B*a^3 - 2*B*b^3 + 2*C*a^3 + 6*A*a* b^2 - 2*A*a^2*b + 2*B*a*b^2 - 6*B*a^2*b + 6*C*a*b^2 - 3*C*a^2*b))/((a + b) *(3*a*b^2 - 3*a^2*b + a^3 - b^3)) + (4*tan(c/2 + (d*x)/2)^3*(3*A*a^3 - 3*B *b^3 + C*a^3 + 7*A*a*b^2 - 7*B*a^2*b + 9*C*a*b^2))/(3*(a + b)^2*(a^2 - 2*a *b + b^2)) + (tan(c/2 + (d*x)/2)^5*(2*A*a^3 + A*b^3 - B*a^3 - 2*B*b^3 + 2* C*a^3 + 6*A*a*b^2 + 2*A*a^2*b - 2*B*a*b^2 - 6*B*a^2*b + 6*C*a*b^2 + 3*C*a^ 2*b))/((a + b)^3*(a - b)))/(d*(3*a*b^2 - tan(c/2 + (d*x)/2)^4*(3*a*b^2 + 3 *a^2*b - 3*a^3 - 3*b^3) - tan(c/2 + (d*x)/2)^2*(3*a*b^2 - 3*a^2*b - 3*a^3 + 3*b^3) + 3*a^2*b + a^3 + b^3 + tan(c/2 + (d*x)/2)^6*(3*a*b^2 - 3*a^2*b + a^3 - b^3))) - (atan((tan(c/2 + (d*x)/2)*(2*a - 2*b)*(3*a*b^2 - 3*a^2*b + a^3 - b^3))/(2*(a + b)^(1/2)*(a - b)^(7/2)))*(A*b^3 - B*a^3 + 2*C*b^3 + 4 *A*a^2*b - 4*B*a*b^2 + 3*C*a^2*b))/(d*(a + b)^(7/2)*(a - b)^(7/2))